package apiday02.homework;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionDemo3 {
    public static void main(String[] args) {
        Collection<Point> c = new ArrayList<>();
        Point p = new Point(1,5);
        c.add(p);
        System.out.println(p);
        System.out.println(c);

        p.setX(50);
        System.out.println(p);
        System.out.println(c);

    }
}
